<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>

<head>
</head>
<style>
</style>

<body>
	<form class="mui-input-group">
		<input type="hidden" id="caseNo" value="${caseNo }">
		<c:forEach items="${list}" var="list">
			<div class="mui-input-row">
				<label>${list.doorNum }号:</label> <span
					style="position: absolute; right: 10px; top: 10px; color: #968e8e;">￥</span>
				<input type="text" name="${list.id }" id="${list.doorNum }"
					value="${list.goodsPrice }" placeholder="￥">
			</div>
		</c:forEach>
		<a class="mui-btn mui-btn-primary submit"
			style="margin-bottom: 10px; display: block;">提交</a>
	</form>
	<script type="text/javascript">
			
			$(".mui-title").html("价格管理");
		
			$(".submit").on("touchstart",function(data) {

				var arr = $("form").serializeArray();
				var prices = "";
				var key = "";

				$.each(arr, function(i, field) {
					prices = prices + field.value + ",";
					key = key + field.name + ",";

				})

				$.post("/goods/postPrice?", {
						prices: prices,
						ids: key,
						caseNo: $("#caseNo").val()
					},
					function(res) {
						mui.toast(res.message);
						history.back();
						parent.window.location.reload();
					})

			})
		</script>
</body>

</html>